public final class TraceBlockingQueue
extends java.lang.Object
Constructor and Description |
---|
TraceBlockingQueue() |
TraceBlockingQueue(int initialCapacity) |
TraceBlockingQueue(int initialCapacity,
int capacityIncrement) |
Modifier and Type | Method and Description |
---|---|
long |
getAverageTakeMillis() |
int |
getMaxLength() |
long |
getTotalTakeMillis() |
java.lang.Object |
peek() |
java.lang.Object[] |
peekAll() |
void |
put(java.lang.Object x) |
void |
resetStatistics() |
void |
setCollectStatistics(boolean enabled) |
int |
size() |
java.lang.Object |
take()
Take one element off the queue -- if no event on the queue, wait forever for one to become available
|
java.lang.Object |
take(long msecs)
Take one element off the queue -- if no event on the queue, wait for a specified time for one to become available
|
java.lang.Object[] |
takeAll()
Take all elements off the queue -- if no events are on the queue, wait forever
|
java.lang.Object[] |
takeAll(long msecs)
Take all elements off the queue -- if no events are on the queue, wait for a specified time
for one to become available
|
public TraceBlockingQueue()
public TraceBlockingQueue(int initialCapacity)
public TraceBlockingQueue(int initialCapacity, int capacityIncrement)
public int getMaxLength()
public long getAverageTakeMillis()
public long getTotalTakeMillis()
public void put(java.lang.Object x) throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object take() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object take(long msecs) throws java.lang.InterruptedException
msecs
- number of milliseconds to wait for an element to be put on the queuejava.lang.InterruptedException
public java.lang.Object[] takeAll() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object[] takeAll(long msecs) throws java.lang.InterruptedException
msecs
- number of milliseconds to wait for an element to be put on the queuejava.lang.InterruptedException
public java.lang.Object[] peekAll()
public java.lang.Object peek()
public void setCollectStatistics(boolean enabled)
public void resetStatistics()
public int size()